#pragma once
#include<boost/asio.hpp>
#include<memory>
#include<string>
#include<functional>
#include<iostream>

class TcpConnect
	:public std::enable_shared_from_this<TcpConnect>
{
private:
	boost::asio::ip::tcp::socket m_socket;
	std::string m_msg;

private:
	TcpConnect(boost::asio::io_context& ioc);
	void handleWrite(const boost::system::error_code& ec, size_t len);

public:
	static std::shared_ptr<TcpConnect> create(boost::asio::io_context& ioc);
	void start();
	boost::asio::ip::tcp::socket& getSocket();
};